package com.dnake.misc;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.dnake.service.TimeTickService;
import com.dnake.service.UpdateAppService;

public class SysReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context ctx, Intent it) {
		String a = it.getAction();
		if (a.equals("android.intent.action.BOOT_COMPLETED")) {
			Intent intent = new Intent(ctx, SysTalk.class);
			ctx.startService(intent);
			Intent intent2 = new Intent(ctx, TimeTickService.class);
			ctx.startService(intent2);
			Intent intent3 = new Intent(ctx, UpdateAppService.class);
			ctx.startService(intent3);
		} else if (a.equals("com.dnake.broadcast")) {
			String e = it.getStringExtra("event");
			if (e.equals("com.dnake.panel.unlock"))
				SysAccess.unlock(0);
		} else if (a.equals("android.bluetooth.device.action.PAIRING_REQUEST")) {
		}
	}
}
